//
//  RefreshFooter.swift
//  SCA
//
//  Created by tjun on 2025/8/31.
//

import UIKit
import MJRefresh

class RefreshFooter: MJRefreshAutoNormalFooter {


    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        setupUI()
    }

    private func setupUI() {
        
        setTitle("加载中..".localizedString, for: .refreshing)
        setTitle("没有更多啦".localizedString, for: .noMoreData)
        setTitle("上拉加载更多".localizedString, for: .idle)
        
        stateLabel?.textColor = UIColorMake(0x999999)
        stateLabel?.font = UIFont.systemFont(ofSize: 13)
        loadingView?.style = UIActivityIndicatorView.Style.medium
    }

    override func placeSubviews() {
        super.placeSubviews()
        
        loadingView?.transform = CGAffineTransformMakeScale(0.8, 0.8)
    }

    override func prepare() {
        super.prepare()
        mj_h = 35
    }
}
